package com.oocl.ita.manager.controller.checkShop;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.oocl.ita.service.CheckShopService;
import com.oocl.ita.service.impl.CheckShopServiceImpl;
import com.oocl.ita.vo.check.CheckShopModel;
import com.oocl.ita.vo.check.ChecksShopModel;

/**
 * Servlet implementation class CheckShops
 */
public class CheckShops extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public CheckShops() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		CheckShopService checkShopService = new CheckShopServiceImpl();
		HttpSession httpSession = request.getSession();
		checkShopService.CheckShops((List<ChecksShopModel>)httpSession.getAttribute("checks"));
		request.getRequestDispatcher("ShowCheckShop").forward(request, response);
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}
